package com.picturehistory.core.rest.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.picturehistory.core.rest.dao.LocationDAO;
import com.picturehistory.core.rest.model.Location;

@Service
public class LocationService {
	@Autowired
	private LocationDAO dao;
	
	public Location getLocationByLatLng(Double lat, Double lng) {
		return dao.loadByLatLng(lat, lng);
	}
	
	public Location addLocation(Double lat, Double lng) {
		return dao.store(lat, lng);
	}
}
